<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('')" />
    </head>
    <style type="text/css">
        #febs-hazardReportConfig .hazardReportConfig-body{
            margin-top: 10px;
            height: calc(100% - 95px);
        }
        #febs-hazardReportConfig .layui-card-header {
            font-size: 16px;
            font-weight: 800;
        }
        #febs-hazardReportConfig .layui-card .layui-card-footer {
            padding: 10px;
            line-height: 36px;
            text-align: left;
            background: #f9f9f9;
        }
    </style>
    <body class="febs-container" id="febs-hazardReportConfig">
        <div class="febs-body layui-fluid"  lay-title="隐患上报设置" >
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="hazardReportConfig-table-form" id="hazardReportConfig-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" th:disabled="!${hasHeadCompanyRole}">
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${currentTenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="layui-row hazardReportConfig-body">
                <form class="layui-form layui-table-form febs-full" action="" lay-filter="hazardReportConfig-form">
                    <div class="layui-col-md4 febs-full">
                        <div class="layui-card febs-full">
                            <div class="layui-card-header" id="form-header">隐患上报设置</div>
                            <div class="layui-card-body" style="height: calc(100% - 120px);">
                                <div class="layui-form-item febs-hide">
                                    <label class="layui-form-label febs-form-item-require">ID：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="reportConfigId" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label febs-form-item-require">上报次数</label>
                                    <div class="layui-input-inline">
                                        <input type="number" id ="reportNumber"  name="reportNumber" autocomplete="off" class="layui-input" style="width: 260px;" minlength="1"
                                               maxlength="4" lay-verify="required"
                                               onkeyup="value=value.replace(/[^\d{1,}\d{1,}|\d{1,}]/g,'').replace(/\./g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
                                        >
                                    </div>
                                    <div class="layui-input-inline">
                                        <label class="myLabel" >(单位:每人每天)</label>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-card-footer" style="background: #f9f9f9;text-align: center;">
                                <button class="layui-btn" lay-submit="" lay-filter="hazardReportConfig-form-submit"
                                        id="submit-form">保存</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script data-th-inline="javascript">
            var hazardReportConfig = [[${hazardReportConfig}]];
        </script>
        <script th:src="@{/febs/js/hazard/hazardReportConfig/hazardReportConfigList.js(v=1)}"></script>
    </body>
</html>